/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.thienloc.omap.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author GiangLT
 */
@Entity
@Table(name = "TBL_SERVICE_CONF", catalog = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TblServiceConf.findAll", query = "SELECT t FROM TblServiceConf t"),
    @NamedQuery(name = "TblServiceConf.findByServiceId", query = "SELECT t FROM TblServiceConf t WHERE t.serviceId = :serviceId"),
    @NamedQuery(name = "TblServiceConf.findByContentMo", query = "SELECT t FROM TblServiceConf t WHERE t.contentMo = :contentMo"),
    @NamedQuery(name = "TblServiceConf.findByContentMt", query = "SELECT t FROM TblServiceConf t WHERE t.contentMt = :contentMt"),
    @NamedQuery(name = "TblServiceConf.findBySc", query = "SELECT t FROM TblServiceConf t WHERE t.sc = :sc"),
    @NamedQuery(name = "TblServiceConf.findByServiceCode", query = "SELECT t FROM TblServiceConf t WHERE t.serviceCode = :serviceCode")})
public class TblServiceConf implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "SERVICE_ID")
    private Long serviceId;
    @Size(max = 180)
    @Column(name = "CONTENT_MO")
    private String contentMo;
    @Size(max = 180)
    @Column(name = "CONTENT_MT")
    private String contentMt;
    @Size(max = 21)
    @Column(name = "SC")
    private String sc;
    @Size(max = 160)
    @Column(name = "SERVICE_CODE")
    private String serviceCode;

    public TblServiceConf() {
    }

    public TblServiceConf(Long serviceId) {
        this.serviceId = serviceId;
    }

    public Long getServiceId() {
        return serviceId;
    }

    public void setServiceId(Long serviceId) {
        this.serviceId = serviceId;
    }

    public String getContentMo() {
        return contentMo;
    }

    public void setContentMo(String contentMo) {
        this.contentMo = contentMo;
    }

    public String getContentMt() {
        return contentMt;
    }

    public void setContentMt(String contentMt) {
        this.contentMt = contentMt;
    }

    public String getSc() {
        return sc;
    }

    public void setSc(String sc) {
        this.sc = sc;
    }

    public String getServiceCode() {
        return serviceCode;
    }

    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (serviceId != null ? serviceId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TblServiceConf)) {
            return false;
        }
        TblServiceConf other = (TblServiceConf) object;
        if ((this.serviceId == null && other.serviceId != null) || (this.serviceId != null && !this.serviceId.equals(other.serviceId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.thienloc.omap.entity.TblServiceConf[ serviceId=" + serviceId + " ]";
    }
}
